package com.anytron.model;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Table(name = "timer_logs")
public class TimerLogs implements Serializable {
	
	private static final long serialVersionUID = 3580440831755776262L;
	@Id
	@Column(name="id")
	private Long id; 
	@Column(name="app_name")
	private String appName; 
	@Column(name="config_name")
	private String configName; 
	@Column(name="timer_time")
	private Date timerTime;
	@Column(name="timer_status")
	private Integer timerStatus;
	@Column(name="timer_msg")
	private String timerMsg;
	@Transient
	private String timerTimeStr;
	
	public String getTimerTimeStr() {
		return timerTimeStr;
	}
	public void setTimerTimeStr(String timerTimeStr) {
		this.timerTimeStr = timerTimeStr;
	}
	public Integer getTimerStatus() {
		return timerStatus;
	}
	public void setTimerStatus(Integer timerStatus) {
		this.timerStatus = timerStatus;
	}
	public String getTimerMsg() {
		return timerMsg;
	}
	public void setTimerMsg(String timerMsg) {
		this.timerMsg = timerMsg;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getAppName() {
		return appName;
	}
	public void setAppName(String appName) {
		this.appName = appName;
	}
	public String getConfigName() {
		return configName;
	}
	public void setConfigName(String configName) {
		this.configName = configName;
	}
	public Date getTimerTime() {
		return timerTime;
	}
	public void setTimerTime(Date timerTime) {
		this.timerTime = timerTime;
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		this.timerTimeStr = dateFormat.format(timerTime);
	}
	
	
}
